package zsl.generator;
import java.io.IOException;

import zsl.utils.WordCount;
import zsl.utils.WordCountList;


public class DefaultWordListGenerator extends WordListGenerator {

	public DefaultWordListGenerator(int dictLen, long seed) throws IOException {
		super(dictLen, seed);
	}

	@Override
	public WordCountList generateWords(int numOfWord) {
			
		WordCountList wordList = new WordCountList(numOfWord);
		
		int curLine = 0;
		int step = dictLen/numOfWord;
		for (int i = 0; i < numOfWord; i++) {
			curLine += randomLineGen.nextInt(step) + 1;
			wordList.add(new WordCount(dict[curLine], (numOfWord-i)*3));
		}
		
		return wordList;
	}
	
	public static void main(String[] args) throws IOException {
		WordListGenerator wg = new DefaultWordListGenerator(10000,1000L);
		System.out.println(wg.generateWords(100));
	}

}
